package com.taobao.api.request;

import java.util.Date;
import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;

import com.taobao.api.TaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.response.HanoiGroupListQueryResponse;
import com.taobao.api.ApiRuleException;
/**
 * TOP API: taobao.hanoi.group.list.query request
 * 
 * @author auto create
 * @since 1.0, 2013-08-03 16:51:00
 */
public class HanoiGroupListQueryRequest implements TaobaoRequest<HanoiGroupListQueryResponse> {

	private Map<String, String> headerMap = new TaobaoHashMap();
	private TaobaoHashMap udfParams; // add user-defined text parameters
	private Long timestamp;

	/** 
	* 认证信息
	 */
	private String appName;

	/** 
	* 模板业务状态 1 审核 0 创建
	 */
	private Long bizStatus;

	/** 
	* 当前页、默认为1
	 */
	private Long currentPage;

	/** 
	* 根据时间查询 创建时间结束点
	 */
	private Date gmtCreateEnd;

	/** 
	* 根据时间查询 创建时间截止点
	 */
	private Date gmtCreateStart;

	/** 
	* 根据时间查询，最近修改时间截止
	 */
	private Date gmtModifiedEnd;

	/** 
	* 根据时间查询，最近修改时间起点
	 */
	private Date gmtModifiedStart;

	/** 
	* 分组的编码
	 */
	private String groupCode;

	/** 
	* 分组id
	 */
	private Long id;

	/** 
	* 是否查询总数，默认false
	 */
	private Boolean isTotal;

	/** 
	* 分组名称
	 */
	private String name;

	/** 
	* 开放策略(true 开放)
	 */
	private Boolean open;

	/** 
	* 分页查询，默认20
	 */
	private Long pageSize;

	/** 
	* 使用场景
	 */
	private Long scene;

	/** 
	* 分组类型 0互斥 1 共存
	 */
	private Long type;

	public void setAppName(String appName) {
		this.appName = appName;
	}
	public String getAppName() {
		return this.appName;
	}

	public void setBizStatus(Long bizStatus) {
		this.bizStatus = bizStatus;
	}
	public Long getBizStatus() {
		return this.bizStatus;
	}

	public void setCurrentPage(Long currentPage) {
		this.currentPage = currentPage;
	}
	public Long getCurrentPage() {
		return this.currentPage;
	}

	public void setGmtCreateEnd(Date gmtCreateEnd) {
		this.gmtCreateEnd = gmtCreateEnd;
	}
	public Date getGmtCreateEnd() {
		return this.gmtCreateEnd;
	}

	public void setGmtCreateStart(Date gmtCreateStart) {
		this.gmtCreateStart = gmtCreateStart;
	}
	public Date getGmtCreateStart() {
		return this.gmtCreateStart;
	}

	public void setGmtModifiedEnd(Date gmtModifiedEnd) {
		this.gmtModifiedEnd = gmtModifiedEnd;
	}
	public Date getGmtModifiedEnd() {
		return this.gmtModifiedEnd;
	}

	public void setGmtModifiedStart(Date gmtModifiedStart) {
		this.gmtModifiedStart = gmtModifiedStart;
	}
	public Date getGmtModifiedStart() {
		return this.gmtModifiedStart;
	}

	public void setGroupCode(String groupCode) {
		this.groupCode = groupCode;
	}
	public String getGroupCode() {
		return this.groupCode;
	}

	public void setId(Long id) {
		this.id = id;
	}
	public Long getId() {
		return this.id;
	}

	public void setIsTotal(Boolean isTotal) {
		this.isTotal = isTotal;
	}
	public Boolean getIsTotal() {
		return this.isTotal;
	}

	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return this.name;
	}

	public void setOpen(Boolean open) {
		this.open = open;
	}
	public Boolean getOpen() {
		return this.open;
	}

	public void setPageSize(Long pageSize) {
		this.pageSize = pageSize;
	}
	public Long getPageSize() {
		return this.pageSize;
	}

	public void setScene(Long scene) {
		this.scene = scene;
	}
	public Long getScene() {
		return this.scene;
	}

	public void setType(Long type) {
		this.type = type;
	}
	public Long getType() {
		return this.type;
	}

	public Long getTimestamp() {
		return this.timestamp;
	}

	public void setTimestamp(Long timestamp) {
		this.timestamp = timestamp;
	}

	public String getApiMethodName() {
		return "taobao.hanoi.group.list.query";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("app_name", this.appName);
		txtParams.put("biz_status", this.bizStatus);
		txtParams.put("current_page", this.currentPage);
		txtParams.put("gmt_create_end", this.gmtCreateEnd);
		txtParams.put("gmt_create_start", this.gmtCreateStart);
		txtParams.put("gmt_modified_end", this.gmtModifiedEnd);
		txtParams.put("gmt_modified_start", this.gmtModifiedStart);
		txtParams.put("group_code", this.groupCode);
		txtParams.put("id", this.id);
		txtParams.put("is_total", this.isTotal);
		txtParams.put("name", this.name);
		txtParams.put("open", this.open);
		txtParams.put("page_size", this.pageSize);
		txtParams.put("scene", this.scene);
		txtParams.put("type", this.type);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public void putOtherTextParam(String key, String value) {
		if(this.udfParams == null) {
			this.udfParams = new TaobaoHashMap();
		}
		this.udfParams.put(key, value);
	}

	public Class<HanoiGroupListQueryResponse> getResponseClass() {
		return HanoiGroupListQueryResponse.class;
	}

	public void check() throws ApiRuleException {
		RequestCheckUtils.checkNotEmpty(appName,"appName");
	}

	public Map<String, String> getHeaderMap() {
		return headerMap;
	}
}
